<script setup lang="ts">
import { useLayoutConfigStore } from '@/store/layoutConfig'

const route = useRoute()
// console.log(333, route.path)
const layoutConfigStore = useLayoutConfigStore()
const { isCollapse } = storeToRefs(layoutConfigStore)

</script>

<template>
  <el-scrollbar>
    <el-menu :router="true" :default-active="route.path" background-color="transparent" :collapse="isCollapse"
      :collapse-transition="false" :default-openeds="['/system']">
      <el-menu-item index="/home">
        <el-icon>
          <i-ep-home-filled />
        </el-icon>
        <template #title>
          <span>首页</span>
        </template>
      </el-menu-item>
      <el-sub-menu index="/system">
        <template #title>
          <el-icon>
            <i-ep-setting />
          </el-icon>
          <span>系统管理</span>
        </template>
        <el-menu-item index="/system/menu">
          <template #title>
            <el-icon>
              <i-ep-menu />
            </el-icon>
            <span>菜单管理</span>
          </template>
        </el-menu-item>
        <el-menu-item index="/system/role">
          <template #title>
            <el-icon>
              <i-ep-ice-cream />
            </el-icon>
            <span>角色管理</span>
          </template>
        </el-menu-item>
        <el-menu-item index="/system/user">
          <template #title>
            <el-icon>
              <i-ep-user />
            </el-icon>
            <span>用户管理</span>
          </template>
        </el-menu-item>
      </el-sub-menu>
      <el-sub-menu index="/goods">
        <template #title>
          <el-icon>
            <i-ep-promotion />
          </el-icon>
          <span>商品管理</span>
        </template>
        <el-menu-item index="/goods/list">
          <template #title>
            <el-icon>
              <i-ep-goods />
            </el-icon>
            <span>商品列表</span>
          </template>
        </el-menu-item>
        <el-menu-item index="/goods/category">
          <template #title>
            <el-icon>
              <i-ep-operation />
            </el-icon>
            <span>商品分类</span>
          </template>
        </el-menu-item>
      </el-sub-menu>
      <el-menu-item index="/hsxp">
        <el-icon>
          <i-ep-link />
        </el-icon>
        <template #title>
          <span>xxx官网</span>
        </template>
      </el-menu-item>
      <el-menu-item index="/401">
        <el-icon>
          <i-ep-goblet />
        </el-icon>
        <template #title>
          <span>401页面</span>
        </template>
      </el-menu-item>
    </el-menu>
  </el-scrollbar>

</template>

<style scoped lang="scss"></style>